--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 2cdc2bfb58e4fdb52f9ef7834db0a986ac7af55e
Parents : 04f2634
Author : Mark Qvist <mark@unsigned.io>
Date : 2022-10-29T16:37:40+02:00
Added dialog displaying RNode hardware errors on startup
Changes
Diff
diff --git a/sbapp/main.py b/sbapp/main.py
index fb379e80..e7591ede 100644
--- a/sbapp/main.py
+++ b/sbapp/main.py
@@ -1,4 +1,5 @@
-__debug_build__ = False
+# TODO: Reset
+__debug_build__ = True
__disable_shaders__ = True
__version__ = "0.2.6"
__variant__ = "beta"
@@ -187,6 +188,27 @@ class SidebandApp(MDApp):
self.app_state = SidebandApp.ACTIVE
self.loading_updater.cancel()
+ def check_errors(dt):
+ if self.sideband.getpersistent("startup.errors.rnode") != None:
+ description = self.sideband.getpersistent("startup.errors.rnode")["description"]
+ self.sideband.setpersistent("startup.errors.rnode", None)
+ yes_button = MDRectangleFlatButton(
+ text="OK",
+ font_size=dp(18),
+ )
+ self.hw_error_dialog = MDDialog(
+ title="Hardware Error",
+ text="When starting a connected RNode, Reticulum reported the following error:\n\n[i]"+description+"[/i]",
+ buttons=[ yes_button ],
+ # elevation=0,
+ )
+ def dl_yes(s):
+ self.hw_error_dialog.dismiss()
+ yes_button.bind(on_release=dl_yes)
+ self.hw_error_dialog.open()
+
+ Clock.schedule_once(check_errors, 1.5)
+
#################################################
# General helpers #
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────